package com.mdsi.models;

public abstract class Person extends Model {

	public static String cryptPass (String pass) {
		return pass ;
	}
	
	private String firstname ;
	public String getFirstname () { return this.firstname ; }
	
	private String lastname ;
	public String getLastname () { return this.lastname ; }
	
	private String email ;
	public String getEmail () { return this.email ; }
	
	private Department dept = null ;
	public Department getDepartment () { return this.dept ; }
	
	private String password ;
	public String getPassword() {
		return password;
	}
	public void setPassword(String password) {
		this.password = password;
	} 

	public Person(String firstname, String lastname, String email, String password, Department dept) {
		super () ;
		this.firstname = firstname ;
		this.lastname = lastname ;
		this.email = email ;
		this.password = cryptPass(password) ;
		this.dept = dept ;
	}
	
	public Person(Long id, String firstname, String lastname, String email,
			Department dept) {
		super (id) ;
		this.firstname = firstname ;
		this.lastname = lastname ;
		this.email = email ;
		this.dept = dept ;
	}

}
